Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

Directional (version 4.1)

Euler angles from a rotation matrix on SO(3): Compute the Euler angles from a rotation matrix on SO(3).

Description

It calculates three euler angles (θ12,θ13,θ23) from a (3×3) rotation matrix X, where X is defined as X=Rz(θ12)×Ry(θ13)×Rx(θ23). Here Rx(θ23) means a rotation of θ23 radians about the x axis.

Usage

rot2eul(X)

Arguments

X

A rotation matrix which is defined as a product of three elementary rotations mentioned above. Here θ12,θ23(π,π) and and θ13(π/2,π/2).

Value

For a given rotation matrix, there are two eqivalent sets of euler angles.

Details

Given a rotation matrix X, euler angles are computed by equating each element in X with the corresponding element in the matrix product defined above. This results in nine equations that can be used to find the euler angles.

References

Green, P. J. \& Mardia, K. V. (2006). Bayesian alignment using hierarchical models, with applications in proteins bioinformatics. Biometrika, 93(2):235--254.

http://www.staff.city.ac.uk/~sbbh653/publications/euler.pdf

See Also

eul2rot

Examples

Run this code
# NOT RUN {
# three euler angles

theta.12 <- sample( seq(-3, 3, 0.3), 1 )
theta.23 <- sample( seq(-3, 3, 0.3), 1 )
theta.13 <- sample( seq(-1.4, 1.4, 0.3), 1 )

theta.12 ; theta.23 ; theta.13

X <- eul2rot(theta.12, theta.23, theta.13)
X  ##  A rotation matrix

e <- rot2eul(X)$v1

theta.12 <- e[3]
theta.23 <- e[2]
theta.13 <- e[1]

theta.12 ; theta.23 ; theta.13
# }

Run the code above in your browser using DataLab